package com.demo.fork.demo1;

import com.google.common.collect.Lists;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CountDownLatch;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * @author : YU.TAN
 * @date : 2021/8/12 18:47
 */
public class Test {
    public static void main(String[] args) {
        List<Integer> list = new ArrayList<>();

        for (Integer i = 1; i < 10000; i++) {
            list.add(i);
        }
        int i = 0;
        do {
//            CountDownLatch countDownLatch = new CountDownLatch(list.size());
            for (Integer integer : list) {
                if (integer.equals(list.size())) {
                    i = 1;
                }
//                countDownLatch.countDown();
            }
//            try {
//                countDownLatch.wait();
//            } catch (InterruptedException e) {
//                e.printStackTrace();
//            }
        } while (i == 0);


        Map<String,String> map=new HashMap<>();
        map.put("1","1");
        map.put("2","1");
        map.put("3","4");
        map.put("4","4");

//
//        Stream< Map<String,String>>()
//                new Stream<>().

//                        Lists.newArrayList(map).stream().collect(Collectors.groupingBy(Map::values));
        Map<String, List<Map.Entry<String, String>>> listMap = map.entrySet().stream().collect(Collectors.groupingBy(Map.Entry::getValue));




    }
}
